package com.bw.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bw.dao.BMapper;
import com.bw.entity.B;
import com.bw.service.BService;

@Service(value = "bService")
public class BServiceImpl implements BService {

    @Autowired
    private BMapper<B>bMapper;
    
    @Override
    public Integer insertSelective(B b) throws Exception {
           return this.bMapper.insertSelective(b);
        }

    @Override
    public Integer insertBatch(List<B> b) throws Exception {
           return this.bMapper.insertBatch(b) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.bMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.bMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(B b) {
           return this.bMapper.updateByPrimaryKeySelective(b);
    }

    @Override
    public B findById(Object id) {
           return (B) this.bMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<B> selectByCondition(B b) {
           return (List<B>) this.bMapper.selectByCondition(b);
    }

    @Override
    public Integer selectCountByCondition(B b) {
           return  this.bMapper.selectCountByCondition(b);
    }

}
